from PyQt5 import QtWidgets
from zxbtools.qrcode_gen import qrcode_ui
import sys
from zxbtools.qrcode_gen.qrcode_service import QrcodeService


class MainWindow(QtWidgets.QMainWindow,  qrcode_ui.Ui_MainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.setupUi(self)
        self.gridLayout.addWidget(self.pushButton, 2, 0, 1, 2)

    def genQrcode(self):
        qrcodeCnt = self.lineEdit1.text()
        qrcodeNum = self.lineEdit2.text()
        QrcodeService(int(qrcodeCnt), int(qrcodeNum)).qrcodego()

if __name__ =='__main__':
    app = QtWidgets.QApplication(sys.argv)
    mainWindow = MainWindow()
    mainWindow.show()
    sys.exit(app.exec_())
